<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>收款与付款</title>
    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
	<script type="text/javascript" src="__INDEX__/dist/jquery.min.js" ></script>
	<script type="text/javascript" src="__INDEX__/js/menudown.js" ></script>
</head>
<body>
	<div class="mui-content">
	    {include file="public/city" /}
	     <div class="glj_bt"><span class="mui-icon iconfont icon-dingdan4" style="font-size: .9rem;"></span><em style="padding-left: 5px;">奖励发放</em><em style="float:right">累积发放总额:{$ljskze?$ljskze : 0.00}</em></div>
	     <div class="glj_bt"><em style="padding-left: 5px;"></em><em style="float:right">累积付款总额:{$ljskze?$ljskze : 0.00}</em></div>
	     <div class="my_orders"></div>
	     <div class="glj_bt"><em>今日收款总额</em><em style="float:right">累计金额:{$jrskje?$jrskje : 0.00}</em></div>
	     <div class="glj_bt"><em>今日付款总额</em><em style="float:right">累计金额:{$jrskje?$jrskje : 0.00}</em></div>
	     <div class="glj_bt"><em>今日收款人数</em><em style="float:right">人数:{$jrskrs?$jrskrs : 0}人</em></div>
	     <div class="glj_bt"><em>今日付款人数</em><em style="float:right">人数:{$jrskrs?$jrskrs : 0}人</em></div>
	     <div class="glj_bt"><em>累计付款人数</em><em style="float:right">累计付款人数:{$ljskrs?$ljskrs : 0}人</em></div>
	     <div class="my_orders"></div>
	     <div class="glj_bt" style="text-align: left;">收付款明细列表</div>
	     <div class="glj_bt1"><input style="font-size:12px;width:200px;height: 30px;line-height: 30px;border-radius: 15px;" id="name" type="text" placeholder="搜索姓名、手机号、会员编号"/>	    
	     <em style="padding-left: 20px;"></em><a href="#" onclick="find()">搜索</a></div>
	   <ul class="record_list2">
	    	<li class="clearfix">
	    		<div class="pj">会员姓名</div>
	    		<div class="pj">订购产品</div>
	    		<div class="pj">支付金额</div>
	    		<div class="pj">交易状态</div>
	    		<div class="pj1">交易时间</div>
    		</li>
	    </ul>
	    <ul class="record_list2 list">
			
	    </ul>
		<p id="no_record" style="color:#D6AA50;text-align: center;display: none;">数据已加载完毕</p>
	  
	</div>
	<input type="hidden" id="page" value="1" />
			{include file="public/bottom" /}
</body>
</html>
	{include file="public/footer" /}
<script src="__PUBLIC__/static/js/mui.min.js"></script>
<script>
	function find(){
		get_data();
	}
	get_data();
	function get_data(){
			$.ajax({
			type:"post",
			data:{
				name:$("#name").val(),
				page:$("#page").val()
			},
			url:"{:url('index/city/skfk')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					for(var i=0;i<list.length;i++){
						var log=list[i];
						var typename = '';
						var type = log.order_type;
						if(type==1){
							typename = '个人会员';
						}else if(type==2){
							typename = '企业会员';
						}else{
							typename = '收款码收款';
						}
						
						var statename = '';
						var state = log.state;
						if(state==2){
							statename = '成功';
						}else{
							statename = '失败';
						}						
						html+='<li class="clearfix">'+
				    		'<div class="pj">'+log.nick_name+'</div>'+
				    		'<div class="pj">'+typename+'</div>'+
				    		'<div class="pj">￥'+log.balance+'</div>'+
				    		'<div class="pj">'+statename+'</div>'+
				    		'<div class="pj1">'+log.add_time+'</div>'+
			    			'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".list").html(html);
				
			}
		});
	}
	$(window).scroll(function(){
		var scrollTop = $(window).scrollTop();       //滚动条高度
		var bodyheight = $(document).height();         //文档的高度
		var windowheight = window.innerHeight;	//$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0){
			$.ajax({
			type:"post",
			data:{
				name:$("#name").val(),
				page:parseFloat($("#page").val())+1
			},
			url:"{:url('index/city/skfk')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					$("#page").val(parseFloat($("#page").val())+1);
					for(var i=0;i<list.length;i++){
						var log=list[i];
						var typename = '';
						var type = log.order_type;
						if(type==1){
							typename = '个人会员';
						}else if(type==2){
							typename = '企业会员';
						}else{
							typename = '收款码收款';
						}
						
						var statename = '';
						var state = log.state;
						if(state==2){
							statename = '成功';
						}else{
							statename = '失败';
						}						
						html+='<li class="clearfix">'+
				    		'<div class="pj">'+log.nick_name+'</div>'+
				    		'<div class="pj">'+typename+'</div>'+
				    		'<div class="pj">￥'+log.balance+'</div>'+
				    		'<div class="pj">'+statename+'</div>'+
				    		'<div class="pj1">'+log.add_time+'</div>'+
			    			'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".list").append(html);
				
			}
		});
		
		}				
	})
	
</script>
